import React, { Component } from 'react';
class App extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }
    render() {
        const {store:{getState,dispatch}}=this.props;
        return (
            <>
            <button onClick={()=>{
            dispatch({type:'add'})
            }}>{getState().num}</button>
            </>
        );
    }
}

export default App;